/**********************************************************************\

 Copyright 2012 Diggory Blake

 This file is part of klip-engine

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.

\**********************************************************************/
#pragma once

#include "kcommon.h"

enum keMouseButtons {
	keMouseButton_None = 0,
	keMouseButton_Left = 1,
	keMouseButton_Right = 2,
	keMouseButton_Middle = 4
};
FLAGS_ENUM(keMouseButtons);

enum keButtonState {
	keButton_Unchanged = 0,
	keButton_Up = 0,
	keButton_Changed = 1,
	keButton_Down = 2,
};
FLAGS_ENUM(keButtonState);


inline keButtonState makeButtonState(bool prev, bool current) {
	return (current ? keButton_Down : keButton_Up) | ((prev != current) ? keButton_Changed : keButton_Unchanged);
}

enum keKeyCode {
	keKey_None			= 0x00,
	keKey_Cancel		= 0x03,
	keKey_BackSpace		= 0x08,
	keKey_Tab			= 0x09,
	keKey_Clear			= 0x0C,
	keKey_Return		= 0x0D,
	keKey_Shift			= 0x10,
	keKey_Control		= 0x11,
	keKey_Menu			= 0x12,
	keKey_Pause			= 0x13,
	keKey_Capital		= 0x14,
	keKey_Escape		= 0x1B,
	keKey_Space			= 0x20,
	keKey_PageUp		= 0x21,
	keKey_PageDown		= 0x22,
	keKey_End			= 0x23,
	keKey_Home			= 0x24,
	keKey_Left			= 0x25,
	keKey_Up			= 0x26,
	keKey_Right			= 0x27,
	keKey_Down			= 0x28,
	keKey_PrintScreen	= 0x2C,
	keKey_Insert		= 0x2D,
	keKey_Delete		= 0x2E,
	keKey_0				= 0x30,
	keKey_1				= 0x31,
	keKey_2				= 0x32,
	keKey_3				= 0x33,
	keKey_4				= 0x34,
	keKey_5				= 0x35,
	keKey_6				= 0x36,
	keKey_7				= 0x37,
	keKey_8				= 0x38,
	keKey_9				= 0x39,
	keKey_A				= 0x41,
	keKey_B				= 0x42,
	keKey_C				= 0x43,
	keKey_D				= 0x44,
	keKey_E				= 0x45,
	keKey_F				= 0x46,
	keKey_G				= 0x47,
	keKey_H				= 0x48,
	keKey_I				= 0x49,
	keKey_J				= 0x4A,
	keKey_K				= 0x4B,
	keKey_L				= 0x4C,
	keKey_M				= 0x4D,
	keKey_N				= 0x4E,
	keKey_O				= 0x4F,
	keKey_P				= 0x50,
	keKey_Q				= 0x51,
	keKey_R				= 0x52,
	keKey_S				= 0x53,
	keKey_T				= 0x54,
	keKey_U				= 0x55,
	keKey_V				= 0x56,
	keKey_W				= 0x57,
	keKey_X				= 0x58,
	keKey_Y				= 0x59,
	keKey_Z				= 0x5A,
	keKey_NumPad0		= 0x60,
	keKey_NumPad1		= 0x61,
	keKey_NumPad2		= 0x62,
	keKey_NumPad3		= 0x63,
	keKey_NumPad4		= 0x64,
	keKey_NumPad5		= 0x65,
	keKey_NumPad6		= 0x66,
	keKey_NumPad7		= 0x67,
	keKey_NumPad8		= 0x68,
	keKey_NumPad9		= 0x69,
	keKey_Multiply		= 0x6A,
	keKey_Add			= 0x6B,
	keKey_Subtract		= 0x6D,
	keKey_Decimal		= 0x6E,
	keKey_Divide		= 0x6F,
	keKey_F1			= 0x70,
	keKey_F2			= 0x71,
	keKey_F3			= 0x72,
	keKey_F4			= 0x73,
	keKey_F5			= 0x74,
	keKey_F6			= 0x75,
	keKey_F7			= 0x76,
	keKey_F8			= 0x77,
	keKey_F9			= 0x78,
	keKey_F10			= 0x79,
	keKey_F11			= 0x7A,
	keKey_F12			= 0x7B,
	keKey_F13			= 0x7C,
	keKey_F14			= 0x7D,
	keKey_F15			= 0x7E,
	keKey_F16			= 0x7F,
	keKey_F17			= 0x80,
	keKey_F18			= 0x81,
	keKey_F19			= 0x82,
	keKey_F20			= 0x83,
	keKey_F21			= 0x84,
	keKey_F22			= 0x85,
	keKey_F23			= 0x86,
	keKey_F24			= 0x87,
	keKey_NumLock		= 0x90,
	keKey_Scroll		= 0x91,
	keKey_Play			= 0xFA,
	keKey_Zoom			= 0xFB,
};
